@import "../common/vars.scss";
@import "../mixins/mixins.scss";

@include create(tabs) {
  @include e(header) {
    padding: 0;
    position: relative;
  }

  @include e(nav-wrap) {
    overflow: hidden;
    margin-bottom: -1px;
    position: relative;
    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 1px;
      background-color: $border-color-light;
      z-index: $index-normal;
    }

    @include when(scrollable) {
      padding: 0 20px;
      box-sizing: border-box;
    }
  }
  @include e(nav-scroll) {
    overflow: hidden;
  }
  @include e((nav-next, nav-prev)) {
    position: absolute;
    cursor: pointer;
    line-height: 44px;
    font-size: 12px;
    color: $color-text-secondary;
  }
  @include e(nav-next) {
    right: 0;
  }
  @include e(nav-prev) {
    left: 0;
  }
  @include e(nav) {
    white-space: nowrap;
    position: relative;
    transition: transform 0.3s;
    float: left;
    z-index: #{$index-normal + 1};

    @include when(stretch) {
      min-width: 100%;
      display: flex;
      & > * {
        flex: 1;
        text-align: center;
      }
    }
  }
  @include e(item) {
    padding: 0 20px;
    height: 50px;
    box-sizing: border-box;
    line-height: 50px;
    display: inline-block;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
    color: $color-text-primary;
    position: relative;

    &:focus,
    &:focus:active {
      outline: none;
    }

    &:focus.is-active.is-focus:not(:active) {
      box-shadow: 0 0 2px 2px $color-primary inset;
      border-radius: 3px;
    }

    @include when(active) {
      color: $color-primary;
    }

    &:hover {
      color: $color-primary;
      cursor: pointer;
    }

    @include when(disabled) {
      color: $disabled-color-base;
      cursor: default;
    }
  }
  @include e(content) {
    overflow: hidden;
    position: relative;
  }

  @include m(card) {
    border-radius: $card-border-radius;
    border: 1px solid $card-border-color;
    background-color: $color-white;
    overflow: hidden;
    color: $color-text-primary;
    transition: 0.3s;

    &:hover,
    &:focus {
        box-shadow: $box-shadow-light;
    }
  }
}
